﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AdminVideo.aspx.cs" Inherits="EduCenterWebsite_AdminVideo" MasterPageFile="ContentMaster.master"%>

<asp:Content ID="Content1" runat="server" contentplaceholderid="ContentPlaceHolder1">
    <div>
    <h1>Administer Content</h1>
    </div>
         <div>                                        
            <asp:Button ID="AddVideo" runat="server" OnClick="AddVideo_Click" Text="Add Content" /> <!-- Button to trigger ajax popup window -->
            <asp:Button ID="DeleteVideo" runat="server" OnClick="DeleteVideo_Click" Text="Delete Content" /> <!-- Button to trigger ajax popup window -->
             <asp:TextBox ID="deleteVideoBox" placeholder="File name without extension" runat="server"></asp:TextBox>
            <br />
            <ajaxToolkit:ModalPopupExtender ID="PopUpButton_ModalPopupExtender" runat="server" DynamicServicePath="" Enabled="True" TargetControlID="addVideo" BackgroundCssClass="modalBg" OnCancelScript="CancelButton" PopupControlID="PopUpPanel">
            </ajaxToolkit:ModalPopupExtender> <!-- Ajax popup to show controls used to upload content to containers -->
            <asp:ScriptManager ID="ScriptManager" runat="server">
            </asp:ScriptManager>
        </div>
    <div>
    <asp:Panel ID="PopUpPanel" runat="server" CssClass="panelBg">
                Main file<asp:FileUpload ID="BlobUploader" runat="server" />
                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" cssClass="validators" Display="Dynamic" runat="server" ControlToValidate="BlobUploader" ErrorMessage="Only Wmv,Pdf,Wma allowed/no spaces" ValidationExpression="^.+(.pdf|.PDF|.wma|.WMA|.wmv|.WMV)$" ValidationGroup="adminvideo"></asp:RegularExpressionValidator>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" cssClass="validators" Display="Dynamic" runat="server" ErrorMessage="Required field" ValidationGroup="adminvideo" ControlToValidate="BlobUploader"></asp:RequiredFieldValidator>
                <br />
                <br />
                File name
                <asp:TextBox ID="FileNameTextBox" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" cssClass="validators" Display="Dynamic" runat="server" ErrorMessage="Required field" ValidationGroup="adminvideo" ControlToValidate="FileNameTextBox"></asp:RequiredFieldValidator>
                <br />
                <br />
                Html video<asp:FileUpload ID="HtmlUploader" runat="server" />
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" cssClass="validators" Display="Dynamic" runat="server" ControlToValidate="HtmlUploader" ErrorMessage="Only html files allowed" ValidationExpression="^.+(.html|.HTML)$" ValidationGroup="adminvideo"></asp:RegularExpressionValidator>
                <br />
                <br />
                Image
                <asp:FileUpload ID="ImgUploader" runat="server" />
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" cssClass="validators" Display="Dynamic" runat="server" ControlToValidate="ImgUploader" ErrorMessage="Only jpg and png files allowed" ValidationExpression="^.+(.png|.PNG|.Png|.jpg|.JPG|.Jpg)$" ValidationGroup="adminvideo"></asp:RegularExpressionValidator>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" cssClass="validators" Display="Dynamic" runat="server" ErrorMessage="Required field" ValidationGroup="adminvideo" ControlToValidate="ImgUploader"></asp:RequiredFieldValidator>
                <br />
                <br />
                Description<asp:TextBox ID="DescriptionTextBox" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" cssClass="validators" Display="Dynamic" runat="server" ErrorMessage="Required field" ValidationGroup="adminvideo" ControlToValidate="DescriptionTextBox"></asp:RequiredFieldValidator>
                <br />
                <br />
                <asp:DropDownList ID="TypeOfFileDropDownList" runat="server">
                    <asp:ListItem Value="listen">Listen</asp:ListItem>
                    <asp:ListItem Value="watch">Watch</asp:ListItem>
                    <asp:ListItem Value="read">Read</asp:ListItem>
                </asp:DropDownList>
                    <asp:DropDownList ID="CategoryDropDownList" runat="server">
                    <asp:ListItem Value="programming">Programming</asp:ListItem>
                    <asp:ListItem Value="chemistry">Chemistry</asp:ListItem>
                    <asp:ListItem Value="biology">Biology</asp:ListItem>
                    <asp:ListItem Value="algorithm">Algorithms</asp:ListItem>
                </asp:DropDownList>
                <br />
                <br />
                <asp:Button ID="OkButton" runat="server" OnClick="OkButton_Click" Text="ok" ValidationGroup="adminvideo"/>
                <asp:Button ID="CancelButton" runat="server" Text="Cancel" />
            </asp:Panel>
        </div>
</asp:Content>